package com.efruit.subsystemadapters;

import java.util.List;

import com.efruit.externalInterfaces.IProductInfoMag;
import com.efruit.productInfoMag.IProductInfo;
import com.efruit.productInfoMag.ProductInfoMagFacade;

public class ProductInfoMagAdapter implements IProductInfoMag{

	ProductInfoMagFacade productInfoMagFacade = null;
	
	public ProductInfoMagAdapter(){
		System.out.println("new ProductInfoMagAdapter");
		productInfoMagFacade =  new ProductInfoMagFacade();
	}
	
	@Override
	public IProductInfo add(String productName, String url, float price,
			int count) {
		return productInfoMagFacade.add(productName, url, price, count);
	}

	@Override
	public boolean remove(int id) {
		return productInfoMagFacade.remove(id);
	}

	@Override
	public IProductInfo update(int id, String productName, String url,
			float price, int count) {
		return productInfoMagFacade.update(id, productName, url, price,
				count);
	}

	@Override
	public List<IProductInfo> getAllProductInfo() {
		
		return productInfoMagFacade.getAllProductInfo();
	}

	@Override
	public IProductInfo getProductInfo(int id) {
		return productInfoMagFacade.getProductInfo(id);
	}
	
}
